<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="/assets/lib/layui/css/layui.css">
    <link rel="stylesheet" href="/assets/css/article_list.css">
</head>

<body>
    <div class="layui-card">
        <div class="layui-card-header">文章列表</div>
        <div class="layui-card-body">
            <form class="filter layui-form layui-form-pane">
                <div class="layui-form-item layui-inline">
                    <label class="layui-form-label">分类</label>
                    <div class="layui-input-block">
                        <select name="cate_id" class="cate_id">

                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-inline">

                    <label class="layui-form-label">状态</label>
                    <div class="layui-input-block">
                        <select name="state" class="state">
                            <option value="">所有状态</option>
                            <option value="已发布">已发布</option>
                            <option value="草稿">草稿</option>
                        </select>
                    </div>
                </div>
                <div class="layui-form-item layui-inline">

                    <div class="layui-input-block">
                        <button class="layui-btn" lay-submit lay-filter="formDemo">筛选</button>
                        <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                    </div>
                </div>
            </form>
            <table class="layui-table">
                <colgroup>
                    <col width="150">
                    <col width="200">
                    <col>
                </colgroup>
                <thead>
                    <tr>
                        <th>文章标题</th>
                        <th>分类</th>
                        <th>发表时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>

                </tbody>
            </table>
            <div id="page"></div>
        </div>

    </div>

</body>
<script type="text/html" id="selectContent">
    <option value="">请选择文章分类</option>
    {{each data}}
    <option value="{{$value.Id}}">{{$value.name}}</option>
    {{/each}}
</script>
<script type="text/html" id="article-list">
    {{each data}}
    <tr>
        <td>{{$value.title}}</td>
        <td>{{$value.cate_name}}</td>
        <td>{{$value.pub_date}}</td>
        <td>{{$value.state}}</td>
        <td><button data-id={{$value.Id}} type="button" class="layui-btn layui-btn-normal layui-btn-sm">编辑</button>
            <button data-id={{$value.Id}} type="button" class="del layui-btn layui-btn-danger layui-btn-sm">删除</button>
        </td>
    </tr>
    {{/each}}
</script>
<script src="/assets/lib/template-web.js"></script>
<script src="/assets/lib/jquery.js"></script>
<script src="/assets/lib/layui/layui.all.js"></script>
<script src="/assets/js/baseAPI.js"></script>
<script src="/assets/js/article_list.js"></script>

</html>